// by Xeno
private ["_vehicle"];
#include "x_setup.sqf"
#include "x_macros.sqf"

#define __Poss _poss = x_sm_pos select 0;
#define __PossAndOther _poss = x_sm_pos select 0;_pos_other = x_sm_pos select 1;

x_sm_pos = [[5838.8042,4773.4839,0], [5801.9199,4736.5713,0], [5877.2466,4804.6782,0]]; // index: 4,   Water tower (chemical weapons) factory near Solnichniy
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	d_current_mission_text = "The enemy is producing chemical weapons in a factory near Obmeya. Find the container that has some of the chemical for the production and destroy it.";
	d_current_mission_resolved_text = "Good job. The container is destroyed.";
};

if (isServer) then {
	__PossAndOther
	_pos_other2 = x_sm_pos select 2;
	_vehicle = "Misc_Cargo1B_military" createvehicle (_poss);
	_vehicle setDir 255;
	#ifndef __TT__
	[_vehicle] execFSM "fsms\XCheckSMHardTarget.fsm";
	#else
	[_vehicle] execFSM "fsms\XCheckSMHardTargetTT.fsm";
	#endif
	sleep 2.123;
	["specops", 1, "basic", 5, _pos_other,80,true] spawn XCreateInf;
	sleep 2.123;
	["shilka", 1, "", 0, "", 0, _pos_other2,1,100,true] spawn XCreateArmor;
	__AddToExtraVec(_vehicle)
};

if (true) exitWith {};